fix(http): add content-type override support for http request#10211
fix(http): add content-type override support for http request#10211vicb merged 1 commit intoangular:masterfrom
Conversation
There was a problem hiding this comment.
No, that is a ridiculous typo. Sorry, will fix.
|
Run gulp as indicated in the contributing docs to fix the CI |
|
Header field names are case-insensitive: I will change to lowercase. And is the API update the gulp task I missed? |
Yep, it will update the .d.ts golden files with public API changes. Read my latest inline comments and figure out if the public API needs to be updated ? |
|
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
52dcd45 to
c665bd5
Compare
|
CLAs look good, thanks! |
|
Please merge the commits and add a test |
There was a problem hiding this comment.
If a user has specified a content-type that isn't in a case statement, won't default override that? Should detecting from the body only occur if the content type is not specified?
There was a problem hiding this comment.
Yes, if not found it would default to whatever type it determined from the body. I was assuming that the limited content types specified as enums were the 'supported' types. And in the future the switch statement could be expanded as more enums are added/supported.
There was a problem hiding this comment.
IIUC this PR does not change the behavior vs the previous impl.
There was a problem hiding this comment.
Sometimes I still want to send an empty content-type header. Now it always detects it from the body, can I somehow override that?
38923d9 to
fd6448c
Compare
|
Tests added and squashed the commits. |
Fix static request to allow the ‘Content-Type’ of a http request to be set from the headers options of the call.
fd6448c to
cb937bc
Compare
|
Updated. And yes, that missing semi-colon really did mess with the formatter. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x")
What is the current behavior? (You can also link to an open issue here)
see #10210
What is the new behavior?
see #10210
Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information:
Fix static request to allow the ‘Content-Type’ of a http request to be set from the headers options of the call.